#ifndef __93143A1D_B320_4daf_933B_F48BF59FE72F__
#define __93143A1D_B320_4daf_933B_F48BF59FE72F__

#include "../import/head.h"
#include "../tools/head.h"

/////////////////////////////////////////////////////////////////////////////////////////
// 

namespace xos
{
    // 
    // 
    // 
    class msg_impl;
    class aio_data;

    // 
    // overlapped ex
    // 
    struct OverlappedEx
    {
        WSAOVERLAPPED m_ov;
        aio_data * m_pAioData;
    };

    // 
    // 
    // 
    class aio_data : public xos_stl::mem_pool_item< aio_data, thread_lock >
    {
    public:
        aio_data();
        ~aio_data();

    public:
        i_aio::enumAioType m_eAioType;

        msg_impl * m_lpMsgData;
        OverlappedEx m_ov_ex;
        DWORD m_dwFlags;
        DWORD m_dwBytes;

        sockaddr_in m_addr;
        int m_nAddrLen;

        DWORD m_dwErrCode;

    public:
        int init();
        int term();

    public:
        int release();

    };
} // xos

#endif // __93143A1D_B320_4daf_933B_F48BF59FE72F__
